<template>
  <view class="box">
    <!-- #ifdef MP-WEIXIN -->
    <view
      class="head"
      :style="
        'padding-top:' +
        statusBarHeight1 +
        'px;padding-right:' +
        (WXwidth + 15) +
        'px;height:' +
        (statusBarHeight1 + 44) +
        'px'
      "
    >
      <!-- #endif -->
      <!-- #ifndef MP-WEIXIN -->
      <view
        class="head"
        :style="
          'padding-top:' + (statusBarHeight1 + 10) + 'px;height:' + (statusBarHeight1 + 54) + 'px'
        "
      >
        <!-- #endif -->
        <view style="width: 124rpx">
          <image
            class="fanhui"
            @click="fanhui"
            src="https://pic.bangbangtongcheng.com/static/fanhui_bai.png"
            mode=""
          ></image>
        </view>
        <view class="biaoti"> 招才管理 </view>
        <view class="manage" @click="manage()">
          {{ text }}
        </view>
      </view>
      <!-- #ifdef MP-WEIXIN -->
      <view
        :style="'padding-top:' + statusBarHeight1 + 'px;height:' + (statusBarHeight1 + 44) + 'px'"
      ></view>
      <!-- #endif -->
      <!-- #ifndef MP-WEIXIN -->
      <view
        :style="'padding-top:' + statusBarHeight1 + 'px;height:' + (statusBarHeight1 + 54) + 'px'"
      ></view>
      <!-- #endif -->
      <!-- 有三种状态 1.未认证用户只有投递记录  2.认证用户有投递记录和收到简历  3.企业有收到简历和获取简历 -->
      <view class="table_top" v-if="list.length">
        <view
          :class="TabCur == i.num ? 'iteam active' : 'iteam'"
          v-for="(i, j) in list"
          :key="j"
          @click="tabChage(i.num)"
        >
          {{ i.text }}
          <image
            v-if="TabCur == i.num"
            class="image"
            src="https://pic.bangbangtongcheng.com/static/xuanzhong.png"
            mode="widthFix"
          />
        </view>
      </view>
      <scroll-view
        class="list"
        @scrolltolower="down"
        :style="'height: calc(100vh - ' + curTop + 'px );'"
        scroll-y="true"
      >
        <!-- 收到简历 -->
        <view class="list_1" v-if="TabCur == 1">
          <view
            class="item"
            v-for="(item, index) in Recommend"
            :key="item.id"
            @click="details(item, 1)"
          >
            <view class="select" v-if="text == '完成'">
              <checkbox
                :checked="item.active"
                :data-index="index"
                @click.stop="changeRadio"
              ></checkbox>
            </view>
            <view class="item_right" :style="'width:' + (text == '完成' ? '610rpx;' : '100%;')">
              <view class="top_title">
                <view class="title">{{ item.resumeTitle }}</view>
                <view class="redDain" v-if="item.receivingStatus != 1"></view>
              </view>
              <view class="position">
                <span
                  class="occupation_text"
                  :key="index1"
                  v-for="(item1, index1) in item.intendedPosition.split(',')"
                  >{{ item1 }}</span
                >
              </view>
              <view class="work">
                <view class="handsOn">{{ item.experienceYears }}工作经验</view>
              </view>
              <view class="individual">
                <view class="name">{{ item.userInformation.nikeName || '未命名用户' }}</view>
                <text
                  class="vip-rank"
                  :style="{
                    color: $member.colors()[item.userInformation.memberLevel - 1].wordColor,
                    backgroundColor: $member.colors()[item.userInformation.memberLevel - 1].bgColor,
                    borderColor: $member.colors()[item.userInformation.memberLevel - 1].lineColor,
                  }"
                >
                  {{ $member.colors()[item.userInformation.memberLevel - 1].level }}
                </text>
              </view>
              <view class="eliver">
                <view class="time">投递时间:{{ item.createDate.split(' ')[0] }}</view>
                <view class="record">{{ item.highestEducation.split(' ')[0] }}</view>
              </view>
              <view class="posts">
                <view class="post"
                  >投递岗位:{{ item.recruitmentInformationDTO.positionCategory }}</view
                >
                <view class="distance" v-if="item.latitude">{{ item.distance }}km</view>
              </view>
            </view>
          </view>
        </view>
        <!-- 投递记录 -->
        <view class="list_2" v-else-if="TabCur == 2">
          <view class="vacancy" v-for="(item, index) in Recommend" :key="item.id">
            <view class="select" v-if="text == '完成'">
              <checkbox
                :checked="item.active"
                :data-index="index"
                @click.stop="changeRadio"
              ></checkbox>
            </view>
            <view
              class="item_right"
              @click="zpdetails(item.recruitmentInformationDTO)"
              :style="'width:' + (text == '完成' ? '610rpx;' : '100%;')"
            >
              <view class="deliverTime">
                <view class=""> 投递时间:{{ item.createDate }} </view>
                <!-- <view class="auditType" v-if="item.auditStatus == '0'">
									审核中
								</view> -->
                <!-- <view class="rejected" v-else-if="item.auditStatus == 2">
									已拒绝
								</view> -->
                <view class="JLJL" @click.stop="details(item, 1)"> 简历记录 </view>
              </view>
              <view class="vehicleRecom">
                <span class="tagLabel">{{
                  item.recruitmentInformationDTO.recruitmentType == 1 ? '全职' : '兼职'
                }}</span>
                <span>{{ item.recruitmentInformationDTO.title }}</span>
              </view>
              <view class="vacancy_center">
                <view class="vacancy_status">
                  <span>{{ item.recruitmentInformationDTO.region }}</span>
                  <span>{{ item.recruitmentInformationDTO.positionCategory }}</span>
                </view>
                <view
                  class="vacancy_price"
                  v-if="item.recruitmentInformationDTO.recruitmentType == 1"
                  >{{
                    item.recruitmentInformationDTO.salaryRange == '面议'
                      ? '面议'
                      : item.recruitmentInformationDTO.salaryRange + '元'
                  }}</view
                >
                <view class="vacancy_price" v-else
                  >{{ item.recruitmentInformationDTO.salaryRange.split(',').join('') }}&emsp;{{
                    item.recruitmentInformationDTO.settlementMethod
                  }}</view
                >
              </view>
              <view class="vacancy_biaoq" v-if="item.recruitmentInformationDTO.fringeBenefits">
                <view class="vacancy_label">
                  <view class="shade"> </view>
                  <view
                    class="label"
                    v-for="(i, j) in item.recruitmentInformationDTO.fringeBenefits.split(',')"
                    :key="j"
                    >{{ i }}</view
                  >
                </view>
                <view
                  class="gend"
                  v-if="item.recruitmentInformationDTO.fringeBenefits.split(',').length > 4"
                >
                  更多>
                </view>
              </view>
              <view class="personalInformation">
                <view class="personalInformation_left">
                  <view class="GR">
                    <image
                      class="personalInformation_image"
                      v-if="item.userInformation.image"
                      :src="item.userInformation.image"
                      mode=""
                    ></image>
                    <image
                      class="personalInformation_image"
                      v-else
                      src="https://pic.bangbangtongcheng.com/static/my/header.png"
                      mode=""
                    ></image>
                    <span class="name">{{
                      item.userInformation.nikeName ? item.userInformation.nikeName : '未命名用户'
                    }}</span>
                  </view>
                  <view class="GS" v-if="item.userInformation.enterpriseRecruitmentStatus == 1">
                    <view class="personalInformation_image"></view>
                    <span class="corporation">{{
                      item.recruitmentInformationDTO.enterpriseName
                    }}</span>
                  </view>
                </view>
                <view class="personalInformation_right">
                  <span class="personalInformation_Time">{{
                    $Time.getDateDiff(item.createDate)
                  }}</span>
                  <span class="personalInformation_distance" v-if="item.distance && item.latitude"
                    >{{ item.distance }}km</span
                  >
                </view>
              </view>
              <view class="status_mask" v-if="item.auditStatus !== '1'">
                <span v-if="item.auditStatus === '0'">待审核</span>
                <span v-else-if="item.auditStatus === '1'">已通过</span>
                <span v-else-if="item.auditStatus == '2'">已拒绝</span>
              </view>
            </view>
          </view>
        </view>
        <!-- 获取简历 -->
        <view class="list_3" v-else-if="TabCur == 3">
          <view
            class="item"
            v-for="(item, index) in Recommend"
            :key="item.id"
            @click="details(item, 2)"
          >
            <view class="select" v-if="text == '完成'">
              <checkbox
                :checked="item.active"
                :data-index="index"
                @click.stop="changeRadio"
              ></checkbox>
            </view>
            <view class="item_right" :style="'width:' + (text == '完成' ? '610rpx;' : '100%;')">
              <view class="tops">
                <view class="title">
                  {{ item.resumeTitle }}
                </view>
                <view class="right">
                  <view class="juLi" v-if="item.latitude">
                    {{ (item.distance / 1000).toFixed(2) }}km
                  </view>
                </view>
              </view>
              <view class="center">
                <view class="zhiye">
                  {{ item.intendedPosition }}
                </view>
                <view class="right">
                  <view class="xueLi">
                    {{ item.highestEducation.split(' ')[0] }}
                  </view>
                  <view class="jyan"> {{ item.experienceYears }}工作经验 </view>
                </view>
              </view>
              <view class="bottom">
                <image
                  class="image"
                  v-if="item.userInformation.image"
                  :src="item.userInformation.image"
                  mode=""
                ></image>
                <image
                  class="image"
                  v-else
                  src="https://pic.bangbangtongcheng.com/static/my/header.png"
                  mode=""
                ></image>
                <view class="name">{{ item.userInformation.nikeName || '未命名用户' }}</view>
                <text
                  class="vip-rank"
                  :style="{
                    color: $member.colors()[item.userInformation.memberLevel - 1].wordColor,
                    backgroundColor: $member.colors()[item.userInformation.memberLevel - 1].bgColor,
                    borderColor: $member.colors()[item.userInformation.memberLevel - 1].lineColor,
                  }"
                >
                  {{ $member.colors()[item.userInformation.memberLevel - 1].level }}
                </text>
              </view>
            </view>
            <view class="status_mask" v-if="item.auditStatus !== '1'">
              <span v-if="item.auditStatus == '0'">待审核</span>
              <span v-else-if="item.auditStatus == '1'">已通过</span>
              <span v-else-if="item.auditStatus == '2'">已拒绝</span>
            </view>
          </view>
        </view>
        <view v-if="Recommend.length == 0" class="none">
          <image src="https://pic.bangbangtongcheng.com/static/none.png" mode="widthFix" />
          <view>最近一年没有数据</view>
        </view>
        <view class="down" v-show="Recommend.length != 0 && !downStatus"
          >仅显示最近一年的数据,最多100份</view
        >
      </scroll-view>
      <view class="bot" v-if="text == '完成'">
        <checkbox
          style="top: 34rpx; left: 30rpx; position: relative"
          :checked="checked"
          @click="allChecked"
        >
        </checkbox>
        <span style="position: absolute; top: 40rpx; left: 90rpx">全选</span>
        <view class="bot_4" @click="xiajiao">删除</view>
      </view>
      <view class="zbc" @click="guan" v-if="zbc">
        <view @click.stop="a" class="shangjia" v-if="shangjia">
          <view class="li_1">确定要删除吗？</view>
          <view class="li_2" @click="guan">取消</view>
          <view class="li_3" @click="cancel">确定</view>
        </view>
      </view>
      <uniBall></uniBall>
    </view>
  </view>
</template>
<script>
  import permision from '@/js_sdk/wa-permission/permission.js'
  //#ifdef H5
  import wxshare from '@/utils/index.js'
  //#endif
  import { mapGetters } from 'vuex'
  export default {
    data() {
      return {
        userInfo: uni.getStorageSync('Pduser'),
        WXwidth: '',
        text: '管理',
        TabCur: 1,
        curTop: 300,
        trigger: false,
        downStatus: true,
        upStatus: true,
        Recommend: [],
        list: [],
        longitude: '',
        latitude: '',
        pageNo: 1,
        pageSize: 10,
        zbc: false,
        shangjia: false,
        checked: false,
        chage: 1,
      }
    },
    async onLoad(options) {
      var than = this
      // #ifdef MP-WEIXIN
      // 获取胶囊信息
      let menuButtonInfo = uni.getMenuButtonBoundingClientRect()
      let getWindowInfo = uni.getWindowInfo().screenWidth
      this.WXwidth = getWindowInfo - (menuButtonInfo.right - menuButtonInfo.width)
      // #endif
      this.statusInformation()
      if (uni.getStorageSync('locationState') == 1) {
        await this.getLocation()
      }
      /* #ifdef H5 */
      this.jinzhi()
      /* #endif */
    },
    onShow() {
      if (this.chage == 2) {
        this.pageNo = 1
        this.Recommend = []
        this.getRecommend()
      }
    },
    methods: {
      // 判断用户身份
      statusInformation() {
        if (
          this.userInfo.personalRecruitmentStatus != 1 &&
          this.userInfo.enterpriseRecruitmentStatus != 1
        ) {
          this.list = []
          this.TabCur = 2
        } else if (
          this.userInfo.personalRecruitmentStatus == 1 &&
          this.userInfo.enterpriseRecruitmentStatus != 1
        ) {
          this.list = [
            { num: 1, text: '收到简历' },
            { num: 2, text: '投递记录' },
          ]
          this.TabCur = 1
        } else if (this.userInfo.enterpriseRecruitmentStatus == 1) {
          this.list = [
            { num: 1, text: '收到简历' },
            { num: 3, text: '获取简历' },
          ]
          this.TabCur = 1
        }
      },
      allChecked() {
        this.checked = !this.checked
        if (this.checked) {
          this.Recommend.forEach((el) => {
            el.active = true
          })
        } else {
          this.Recommend.forEach((el) => {
            el.active = false
          })
        }
      },
      changeRadio(e) {
        let that = this
        let index = e.currentTarget.dataset.index
        that.Recommend[index].active = !that.Recommend[index].active
        if (this.checked) {
          that.Recommend.forEach((v) => {
            if (!v.active) {
              this.checked = false
            }
          })
        }
      },
      a() {},
      xiajiao() {
        let that = this
        let arr1 = []
        let arr = this.Recommend.filter((el) => {
          if (el.active) {
            arr1.push(el.id)
          }
          return el.active
        })
        if (arr.length == 0) {
          uni.showToast({
            title: '请选择删除记录',
            icon: 'none',
            mask: true,
          })
          return
        }
        this.zbc = true
        this.shangjia = true
      },
      guan() {
        this.zbc = false
        this.shangjia = false
      },
      cancel() {
        let that = this
        let arr1 = []
        let arr = this.Recommend.filter((el) => {
          if (el.active) {
            arr1.push(el.id)
          }
          return el.active
        })
        if (!arr.length) {
          uni.showToast({
            title: '请选择删除记录',
            icon: 'none',
            mask: true,
          })
        }
        if (this.TabCur == 1) {
          this.cancelSD(String(arr1))
        } else if (this.TabCur == 2) {
          this.cancelTD(String(arr1))
        } else if (this.TabCur == 3) {
          this.cancelHQ(String(arr1))
        }
      },
      // 收到简历删除
      cancelSD(arr1) {
        let that = this
        this.$myRequest
          .post('/api/mobile/personnelOwner/dislodgeReceivedResume', {
            userId: this.userInfo.id,
            ids: arr1,
          })
          .then((res) => {
            uni.showToast({
              title: res.msg,
              icon: 'none',
              mask: true,
            })
            setTimeout(() => {
              that.manage()
              that.guan()
              that.Recommend = []
              that.pageNo = 1
              that.downStatus = true
              that.upStatus = true
              this.getRecommend()
            }, 1000)
          })
      },
      // 投递简历删除
      cancelTD(arr1) {
        let that = this
        this.$myRequest
          .post('/api/mobile/personnelOwner/dislodgePostingResume', {
            userId: this.userInfo.id,
            ids: arr1,
          })
          .then((res) => {
            uni.showToast({
              title: res.msg,
              icon: 'none',
              mask: true,
            })
            setTimeout(() => {
              that.manage()
              that.guan()
              that.Recommend = []
              that.pageNo = 1
              that.downStatus = true
              that.upStatus = true
              this.getRecommend()
            }, 1000)
          })
      },
      // 获取简历删除
      cancelHQ(arr1) {
        let that = this
        this.$myRequest
          .post('/api/mobile/personnelOwner/deleteGetResumeRecord', {
            userId: this.userInfo.id,
            ids: arr1,
          })
          .then((res) => {
            uni.showToast({
              title: res.msg,
              icon: 'none',
              mask: true,
            })
            setTimeout(() => {
              that.manage()
              that.guan()
              that.Recommend = []
              that.pageNo = 1
              that.downStatus = true
              that.upStatus = true
              this.getRecommend()
            }, 1000)
          })
      },
      manage() {
        if (this.text == '管理') {
          this.text = '完成'
        } else {
          this.text = '管理'
        }
      },
      tabChage(index) {
        this.TabCur = index
        this.pageNo = 1
        this.Recommend = []
        this.text = '管理'
        this.getRecommend()
      },
      getRecommend() {
        let that = this
        this.upStatus = false
        if (this.TabCur == 1) {
          this.sdnotes()
        } else if (this.TabCur == 2) {
          this.tdnotes()
        } else if (this.TabCur == 3) {
          this.hqnotes()
        }
      },
      // 获取收到简历数据
      sdnotes() {
        let that = this
        this.$myRequest
          .get('/api/mobile/personnelOwner/getResumeReceivedTabulation', {
            userId: this.userInfo.id,
            longitude: this.longitude,
            latitude: this.latitude,
            pageNo: this.pageNo,
            pageSize: this.pageSize,
          })
          .then((res) => {
            uni.hideLoading()
            if (!res.resumeReceivedTabulation.pageList.length) {
              that.downStatus = false
            }
            if (res.resumeReceivedTabulation.pageList.length < this.pageSize) {
              that.downStatus = false
            }
            this.upStatus = true
            this.trigger = false
            res.resumeReceivedTabulation.pageList.forEach((v) => {
              v.active = false
            })
            this.Recommend = this.Recommend.concat(res.resumeReceivedTabulation.pageList)
            if (this.chage == 1) {
              this.chage = 2
            }
            uni.stopPullDownRefresh()

            this.$nextTick(function () {
              uni
                .createSelectorQuery()
                .in(this)
                .select('.list')
                .boundingClientRect((result) => {
                  if (result) {
                    that.curTop = result.top
                  }
                })
                .exec()
            })
          })
      },
      // 获取投递记录数据
      tdnotes() {
        let that = this
        this.$myRequest
          .get('/api/mobile/personnelOwner/getDeliveryRecordTabulation', {
            userId: this.userInfo.id,
            longitude: this.longitude,
            latitude: this.latitude,
            pageNo: this.pageNo,
            pageSize: this.pageSize,
          })
          .then((res) => {
            uni.hideLoading()
            if (!res.deliveryRecordTabulation.pageList.length) {
              that.downStatus = false
            }
            if (res.deliveryRecordTabulation.pageList.length < this.pageSize) {
              that.downStatus = false
            }
            this.upStatus = true
            this.trigger = false
            res.deliveryRecordTabulation.pageList.forEach((v) => {
              v.active = false
            })
            this.Recommend = this.Recommend.concat(res.deliveryRecordTabulation.pageList)
            if (this.chage == 1) {
              this.chage = 2
            }
            uni.stopPullDownRefresh()

            this.$nextTick(function () {
              uni
                .createSelectorQuery()
                .in(this)
                .select('.list')
                .boundingClientRect((result) => {
                  if (result) {
                    that.curTop = result.top
                  }
                })
                .exec()
            })
          })
      },
      // 获取简历数据
      hqnotes() {
        let that = this
        this.$myRequest
          .get('/api/mobile/personnelOwner/getObtainResumeRecords', {
            userId: this.userInfo.id,
            longitude: this.longitude,
            latitude: this.latitude,
            pageNo: this.pageNo,
            pageSize: this.pageSize,
          })
          .then((res) => {
            uni.hideLoading()
            if (!res.obtainResumeRecords.pageList.length) {
              that.downStatus = false
            }
            if (res.obtainResumeRecords.pageList.length < this.pageSize) {
              that.downStatus = false
            }
            this.upStatus = true
            this.trigger = false
            res.obtainResumeRecords.pageList.forEach((v) => {
              v.active = false
            })
            this.Recommend = this.Recommend.concat(res.obtainResumeRecords.pageList)
            if (this.chage == 1) {
              this.chage = 2
            }
            uni.stopPullDownRefresh()

            this.$nextTick(function () {
              uni
                .createSelectorQuery()
                .in(this)
                .select('.list')
                .boundingClientRect((result) => {
                  if (result) {
                    that.curTop = result.top
                  }
                })
                .exec()
            })
          })
      },
      // 招聘跳转
      zpdetails(item) {
        if (item.deleteFlag == '1') {
          uni.showToast({
            title: '该职位已关闭！',
            icon: 'none',
            mask: true,
          })
          return
        }
        if (item.shelfStatus != '1') {
          uni.showToast({
            title: '该职位已关闭！',
            icon: 'none',
            mask: true,
          })
          return
        }
        if (item.recruitmentType == '1') {
          uni.navigateTo({
            url: '/pages_recruitMoney/recruitmentDetails/fullTime?id=' + item.id,
          })
        } else {
          uni.navigateTo({
            url: '/pages_recruitMoney/recruitmentDetails/concurrently?id=' + item.id,
          })
        }
        // this.$myRequest.get("/api/mobile/personnelOwner/getRecruitmentById", {
        // 	id: item.id,
        // 	userId: this.userInfo.id
        // }).then(res=>{
        // 	if(!res.recommendedPosition.id){
        // 		uni.showToast({
        // 			title:'该职位已关闭！',
        // 			icon: "none",
        // 			mask: true
        // 		});
        // 		return
        // 	}
        // 	if(item.recruitmentType == '1'){
        // 		uni.navigateTo({
        // 			url: "/pages_recruitMoney/recruitmentDetails/fullTime?id=" + item.id,
        // 		});
        // 	}else{
        // 		uni.navigateTo({
        // 			url: "/pages_recruitMoney/recruitmentDetails/concurrently?id=" + item.id,
        // 		});
        // 	}
        // })
      },
      details(item, index) {
        if (index == 1) {
          // uni.navigateTo({
          // 	url: "/pages_recruitMoney/recruitmentDetails/resumeDetails?id=" + item.id + '&indextd=1',
          // });
          if (item.pictureAttachment) {
            uni.navigateTo({
              url: '/pages_recruitMoney/resume/resumeTemplateDetails?id=' + item.id + '&index=1',
            })
          } else {
            uni.navigateTo({
              url:
                '/pages_recruitMoney/recruitmentDetails/resumeDetails?id=' + item.id + '&indextd=1',
            })
          }
        } else {
          // uni.navigateTo({
          // 	url: "/pages_recruitMoney/recruitmentDetails/resumeDetails?id=" + item.resumeId + '&indextd=2',
          // });
          if (item.pictureAttachment) {
            uni.navigateTo({
              url: '/pages_recruitMoney/resume/resumeTemplateDetails?id=' + item.id + '&index=2',
            })
          } else {
            uni.navigateTo({
              url:
                '/pages_recruitMoney/recruitmentDetails/resumeDetails?id=' +
                item.resumeId +
                '&indextd=2',
            })
          }
        }
        if (index == 1) {
          if (item.receivingStatus != 1) {
            this.read(item.id)
            this.Recommend.forEach((v) => {
              if (v.id == item.id) {
                item.receivingStatus = 1
              }
            })
          }
        }
      },
      // 已读消息
      read(id) {
        let that = this
        this.$myRequest
          .post('/api/mobile/personnelOwner/markRead', {
            id: id,
            markerBy: this.userInfo.id,
          })
          .then((res) => {})
      },
      // 点击会员
      goMyLevel() {
        uni.navigateTo({
          url: '/pages_my/bangClub',
        })
      },
      down() {
        if (this.downStatus) {
          this.pageNo++
          this.getRecommend()
        }
      },
      jinzhi() {
        let _this = this
        let param = window.location.href.split('#')[0]
        uni.request({
          method: 'post',
          data: {
            url: param,
          },
          header: {
            'content-type': 'application/x-www-form-urlencoded',
          },
          url: 'https://www.bangbangtongcheng.com/conven//mob/login/getJsTicket.do',
          success(re) {
            _this.jinzhifx(re.data)
          },
        })
      },
      jinzhifx(data) {
        wxshare.config({
          debug: false, //是否打开调试
          appId: data.appId, // 公众号的唯一标识
          timestamp: data.timestamp, // 生成签名的时间戳
          nonceStr: data.nonce, // ，生成签名的随机串
          signature: data.signature, // 签名
          jsApiList: ['hideMenuItems'],
        })
        // 禁止分享
        wxshare.hideMenuItems({
          // 要隐藏的菜单项，只能隐藏“传播类”和“保护类”按钮，所有menu项见附录3
          menuList: [
            'menuItem:share:appMessage',
            'menuItem:share:timeline',
            'menuItem:share:timeline',
            'menuItem:share:qq',
            'menuItem:favorite',
            'menuItem:share:QZone',
            'menuItem:openWithSafari',
          ],
        })
      },
      fanhui() {
        uni.navigateBack({
          delta: 1,
        })
      },
      async getLocation() {
        this.getLocation1()
      },
      getLocation1() {
        uni.showLoading({
          title: '加载中',
          mask: true,
        })
        let _this = this
        uni.getLocation({
          type: 'gcj02',
          highAccuracyExpireTime: '3000',
          success(res) {
            _this.latitude = res.latitude
            _this.longitude = res.longitude
            _this.getRecommend()
          },
          fail:(res) => {
            console.log(res, '经纬度没有授权');
            this.$SHOWMODAL_TO_SETTINGS();
            uni.setStorageSync('locationState', 0)
            if (uni.getStorageSync('locationState') == 0) {
              // uni.showModal({
              //   title: '提示',
              //   content: '您已关闭位置权限或获取位置信息失败',
              //   success: function (res) {
              //     if (res.confirm) {
              //       // plus.runtime.openURL("app-settings:");
              //       if (plus.os.name === 'iOS') {
              //         plus.runtime.openURL('app-settings://')
              //       } else {
              //         var Intent = plus.android.importClass('android.content.Intent')
              //         var Settings = plus.android.importClass('android.provider.Settings')
              //         var Uri = plus.android.importClass('android.net.Uri')
              //         var mainActivity = plus.android.runtimeMainActivity()
              //         var intent = new Intent()
              //         intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
              //         var uri = Uri.fromParts('package', mainActivity.getPackageName(), null)
              //         intent.setData(uri)
              //         mainActivity.startActivity(intent)
              //       }
              //     } else if (res.cancel) {
              //       console.log('用户点击取消')
              //     }
              //   },
              // })
              return false
            }
          },
        })
      },
    },
    computed: {
      ...mapGetters(['userid', 'islogin', 'statusBarHeight1', 'userinfo']),
    },
  }
</script>
<style lang="less" scoped>
  .box {
    width: 100%;
    min-height: 100vh;
    background-color: #fff;
  }

  .head {
    position: fixed;
    top: 0;
    left: 0;
    width: 750rpx;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    background-color: #64b6a8;
    z-index: 1000;
    color: #fff;

    .fanhui {
      width: 40rpx;
      height: 40rpx;
    }
    .biaoti {
      font-size: 36rpx;
      font-weight: 500;
    }
    .manage {
      width: 124rpx;
      height: 48rpx;
      border-radius: 6rpx;
      border: 1px solid #ffffff;
      font-size: 26rpx;
      font-weight: 400;
      color: #ffffff;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }
  .table_top {
    width: 750rpx;
    height: 100rpx;
    box-shadow: 0px 1px 6rpx 1px rgba(201, 201, 201, 0.21);
    border: 1px solid rgba(222, 222, 222, 0.25);
    display: flex;
    align-items: center;

    .iteam {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      font-size: 32rpx;
      font-weight: 400;
      color: #333333;

      .image {
        width: 50rpx;
        height: 24rpx;
      }
    }

    .active {
      color: #64b6a8;
    }
  }
  .list {
    .list_1 {
      padding: 0 30rpx;
      .item {
        display: flex;
        align-items: center;
        .select {
          width: 80rpx;
          height: 100%;
        }
        .item_right {
          width: 100%;
          padding: 30rpx 0;
          border-bottom: 1px solid #e0e0e0;
          .top_title {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            .title {
              flex: 1;
              font-size: 28rpx;
              font-weight: 600;
              color: #333333;
              margin-bottom: 16rpx;
            }
            .redDain {
              width: 16rpx;
              height: 16rpx;
              border-radius: 16rpx;
              background-color: red;
              margin-left: 20rpx;
            }
          }
          .position {
            font-size: 24rpx;
            font-weight: 400;
            color: #333333;
            margin-bottom: 16rpx;
            .occupation_text {
              padding-right: 10rpx;
            }
          }
          .work {
            display: flex;
            align-items: center;
            font-size: 24rpx;
            font-weight: 400;
            color: #333333;
            margin-bottom: 16rpx;
            .did {
              margin-right: 18rpx;
            }
          }
          .individual {
            display: flex;
            align-items: center;
            margin-bottom: 16rpx;
            .name {
              font-size: 24rpx;
              font-weight: 550;
              color: #333333;
              margin-right: 18rpx;
            }
            .vip-rank {
              padding: 3rpx 10rpx;
              margin: 0 18rpx 0 0;
              background: #f6f0ff;
              border-radius: 6rpx 6rpx 6rpx 6rpx;
              opacity: 1;
              border: 2rpx solid #bd90d9;
              font-size: 24rpx;
              font-weight: 500;
              color: #bd90d9;
            }
          }
          .eliver {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 24rpx;
            font-weight: 400;
            color: #333333;
            margin-bottom: 16rpx;
          }

          .posts {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 24rpx;
            font-weight: 400;
            color: #333333;
          }
        }
      }
    }
    .list_2 {
      padding: 0 30rpx;
      position: relative;
      .vacancy {
        position: relative;
        display: flex;
        align-items: center;
        .select {
          width: 80rpx;
          height: 100%;
        }
        .item_right {
          width: 100%;
          padding: 30rpx 0;
          border-bottom: 1px solid #e0e0e0;
          .deliverTime {
            font-size: 24rpx;
            font-weight: 400;
            color: #333333;
            margin-bottom: 16rpx;
            display: flex;
            align-items: center;
            justify-content: space-between;
            .auditType {
              width: 110rpx;
              height: 40rpx;
              background-color: #f1a154;
              border-radius: 8rpx;
              font-size: 28rpx;
              font-weight: 400;
              color: #ffffff;
              display: flex;
              align-items: center;
              justify-content: center;
            }
            .rejected {
              width: 110rpx;
              height: 40rpx;
              background-color: #e86565;
              border-radius: 8rpx;
              font-size: 28rpx;
              font-weight: 400;
              color: #ffffff;
              display: flex;
              align-items: center;
              justify-content: center;
            }
            .JLJL {
              width: 124rpx;
              height: 48rpx;
              border-radius: 6rpx;
              border: 1px solid #64b6a8;
              font-size: 26rpx;
              font-weight: 400;
              color: #64b6a8;
              display: flex;
              align-items: center;
              justify-content: center;
            }
          }
          .vehicleRecom {
            font-size: 28rpx;
            font-weight: 600;
            color: #333333;
            word-break: break-all;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 1; //想要的行数
            -webkit-box-orient: vertical;
            .tagLabel {
              vertical-align: top;
              background: #64b6a8;
              color: #fff;
              font-size: 24rpx;
              text-align: center;
              width: 106rpx;
              margin-right: 10rpx;
              padding: 2rpx 6rpx;
              border-radius: 4rpx;
            }
          }
          .vacancy_center {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 16rpx;
            .vacancy_status {
              span {
                font-size: 28rpx;
                font-weight: 400;
                color: #333333;
              }
              span:nth-child(1) {
                margin-right: 16rpx;
              }
            }
            .vacancy_price {
              font-size: 30rpx;
              font-weight: 550;
              color: #e00000;
            }
          }
          .vacancy_biaoq {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 16rpx;
            .vacancy_label {
              flex: 1;
              height: 48rpx;
              position: relative;
              overflow: hidden;
              white-space: nowrap;
              .shade {
                position: absolute;
                right: 0;
                top: 0;
                width: 100rpx;
                height: 48rpx;
                background: linear-gradient(
                  to right,
                  rgba(255, 255, 255, 0),
                  rgba(255, 255, 255, 1)
                );
              }
              .label {
                display: inline-block;
                padding: 10rpx;
                background-color: #f0f0f0;
                margin-right: 10rpx;
                font-size: 24rpx;
                font-weight: 400;
                color: #333333;
                border-radius: 4rpx;
              }
              .label:nth-last-child(1) {
                margin-right: 0rpx;
              }
            }
            .gend {
              text-align: right;
              width: 80rpx;
              height: 100%;
              font-size: 24rpx;
              color: #888888;
            }
          }
          .personalInformation {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 28rpx;
            .personalInformation_left {
              display: flex;
              flex-direction: column;
              .personalInformation_image {
                width: 42rpx;
                height: 42rpx;
                border-radius: 42rpx;
                margin-right: 12rpx;
              }
              .GR {
                display: flex;
                align-items: center;
                .name {
                  font-size: 24rpx;
                  font-weight: 400;
                  color: #333333;
                }
              }
              .GS {
                display: flex;
                align-items: center;
                .corporation {
                  font-size: 24rpx;
                  font-weight: 400;
                  color: #333333;
                }
              }
            }
            .personalInformation_right {
              display: flex;
              flex-direction: column;
              justify-content: flex-end;
              .personalInformation_Time {
                font-size: 24rpx;
                font-weight: 400;
                color: #888888;
                margin-bottom: 6rpx;
                text-align: right;
              }
              .personalInformation_distance {
                font-size: 24rpx;
                font-weight: 400;
                color: #888888;
                text-align: right;
              }
            }
          }
        }
      }
    }
    .list_3 {
      padding: 0 30rpx;
      .item {
        display: flex;
        align-items: center;
        position: relative;
        .status_mask {
          width: 140rpx;
          height: 72rpx;
          color: #fff;
          background-color: rgba(0, 0, 0, 0.5);
          position: absolute;
          left: 50%;
          top: 30%;
          transform: rotate(-30deg) translate(-50%, -50%);
          border-radius: 8rpx;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 28rpx;
          line-height: 28rpx;
        }
        .select {
          width: 80rpx;
          height: 100%;
        }
        .item_right {
          width: 100%;
          padding: 30rpx 0;
          border-bottom: 1px solid #e0e0e0;
          .tops {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 16rpx;
            position: relative;
            .title {
              flex: 1;
              font-size: 28rpx;
              font-weight: 600;
              color: #333333;
              overflow: hidden;
              text-overflow: ellipsis;
              white-space: nowrap;
            }
            .right {
              margin-left: 80rpx;
              display: flex;
              align-items: center;
              font-size: 24rpx;
              font-weight: 400;
              color: #999999;
              .address {
                margin-right: 10rpx;
              }
            }
            .dian {
              position: absolute;
              right: 0;
              top: -10rpx;
              width: 18rpx;
              height: 18rpx;
              border-radius: 18rpx;
              background-color: #ea4b4b;
            }
          }
          .center {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 16rpx;
            .zhiye {
              font-size: 24rpx;
              font-weight: 400;
              color: #333333;
            }
            .right {
              display: flex;
              align-items: center;
              font-size: 24rpx;
              font-weight: 400;
              color: #333333;
              .xueLi {
                margin-right: 10rpx;
              }
            }
          }
          .bottom {
            display: flex;
            align-items: center;
            margin-bottom: 16rpx;
            .image {
              width: 40rpx;
              height: 40rpx;
              border-radius: 40rpx;
              margin-right: 12rpx;
            }
            .name {
              font-size: 24rpx;
              font-weight: 550;
              color: #333333;
              margin-right: 12rpx;
            }
            .vip-rank {
              padding: 3rpx 10rpx;
              margin: 0 18rpx 0 0;
              background: #f6f0ff;
              border-radius: 6rpx 6rpx 6rpx 6rpx;
              opacity: 1;
              border: 2rpx solid #bd90d9;
              font-size: 24rpx;
              font-weight: 500;
              color: #bd90d9;
            }
          }
          .time {
            font-size: 24rpx;
            font-weight: 400;
            color: #999999;
            margin-bottom: 16rpx;
          }
          .gangw {
            font-size: 24rpx;
            font-weight: 400;
            color: #999999;
          }
        }
      }
    }
  }
  .down {
    height: 60rpx;
    line-height: 60rpx;
    text-align: center;
    margin-top: 40rpx;
    font-size: 24rpx;
    color: rgba(180, 180, 180, 0.5);
  }

  .bot {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120rpx;
    background-color: #fff;
    z-index: 9;

    view {
      display: inline-block;
      position: absolute;
    }

    .bot_1 {
      left: 42rpx;
      top: 38rpx;
    }

    .bot_4 {
      width: 200rpx;
      height: 70rpx;
      background: #64b6a8;
      color: #ffffff;
      line-height: 68rpx;
      left: 520rpx;
      top: 25rpx;
      text-align: center;
      border-radius: 36rpx;
    }
  }

  .zbc {
    position: fixed;
    width: 100%;
    top: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 10;
    .tan {
      position: absolute;
      width: 600rpx;
      height: 420rpx;
      background-color: #fff;
      top: 30%;
      left: 50%;
      transform: translateX(-50%);
      border-radius: 10rpx;
      overflow: hidden;

      .li_1 {
        margin-left: 32rpx;
        margin-top: 60rpx;
        font-weight: 600;
        font-size: 30rpx;
      }

      .li_2 {
        font-size: 30rpx;
        margin-left: 32rpx;
        margin-top: 30rpx;

        view {
          display: inline-block;
          font-weight: 600;
          font-size: 30rpx;
        }

        .xuan {
          position: relative;
          width: 160rpx;
          height: 60rpx;
          background: #ffffff;
          border: 2rpx solid #64b6a8;
          border-radius: 37rpx;
          line-height: 60rpx;
          color: #64b6a8;
          text-indent: 16rpx;
        }

        .xuan::before {
          position: absolute;
          top: 20rpx;
          right: 30rpx;
          content: '';
          border-color: #fff #fff #64b6a8 #fff;
          border-style: solid;
          border-width: 0rpx 8rpx 14rpx 8rpx;
          height: 0;
          width: 0;
        }
      }

      .li_3 {
        width: 536rpx;
        font-size: 24rpx;
        margin-left: 32rpx;
        color: #ea4b4b;
        margin-top: 40rpx;
      }

      .li_4 {
        position: absolute;
        font-size: 30rpx;
        width: 300rpx;
        height: 90rpx;
        background: #f2f2f2;
        bottom: 0;
        left: 0;
        text-align: center;
        line-height: 90rpx;
      }

      .li_5 {
        position: absolute;
        font-size: 30rpx;
        width: 300rpx;
        height: 90rpx;
        background: #64b6a8;
        bottom: 0;
        right: 0;
        text-align: center;
        line-height: 90rpx;
        color: #fff;
      }
    }

    .shangjia {
      position: absolute;
      width: 600rpx;
      height: 300rpx;
      background-color: #fff;
      border-radius: 10rpx;
      top: 30%;
      left: 50%;
      transform: translateX(-50%);

      .li_1 {
        // width: 100%;
        font-size: 34rpx;
        font-weight: 600;
        // margin-left: 165rpx;
        margin-top: 80rpx;
        text-align: center;
      }

      .li_2 {
        display: inline-block;
        vertical-align: top;
        width: 160rpx;
        height: 60rpx;
        background: #ffffff;
        border: 2rpx solid #64b6a8;
        border-radius: 37rpx;
        text-align: center;
        line-height: 60rpx;
        color: #64b6a8;
        margin-top: 58rpx;
        margin-left: 118rpx;
      }

      .li_3 {
        display: inline-block;
        vertical-align: top;
        width: 160rpx;
        height: 60rpx;
        background: #64b6a8;
        border-radius: 37rpx;
        text-align: center;
        line-height: 60rpx;
        color: #fff;
        margin-top: 58rpx;
        margin-left: 46rpx;
      }
    }
  }

  .none {
    text-align: center;

    image {
      width: 430rpx;
      margin-bottom: 16rpx;
    }
    view {
      height: 40rpx;
      line-height: 40rpx;
      color: #666;
    }
  }
  /deep/uni-checkbox .uni-checkbox-input {
    background-color: rgba(0, 0, 0, 0);
    border: 2rpx solid #999;
  }

  /deep/uni-checkbox .wx-checkbox-input,
  /deep/uni-checkbox .uni-checkbox-input {
    width: 48rpx;
    height: 48rpx;
  }

  /deep/.uni-checkbox-input-checked {
    background-color: #64b6a8 !important;
    border: 2rpx solid #64b6a8 !important;
  }

  /deep/ uni-checkbox::before {
    font-size: 40rpx;
    margin-top: -14rpx;
    right: 6rpx !important;
  }

  .status_mask {
    width: 140rpx;
    height: 72rpx;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.4);
    position: absolute;
    left: 50%;
    top: 30%;
    transform: rotate(-30deg) translate(-50%, -50%);
    border-radius: 8rpx;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28rpx;
    line-height: 28rpx;
  }
</style>
